<%@page import="java.text.DateFormat,java.util.List,com.crm.entity.Opportunity"%>
<%@page import="java.text.SimpleDateFormat"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
</head>
<body>
<div id="main">
<div id="content">
   <div id="work-area2">
 	<div class="boxIFS">
	 
	  <div id="demo">
	 <table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#C5E4EB">
          <tr>
            <td width="186" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Reference Number</td>
            <td width="162" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF"> Enquiry Number</td>
            <td width="138" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"  style="background-repeat:repeat-x bgcolor="#FFFFFF">Type of Enquiry</td>
            <td width="140" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"   style="background-repeat:repeat-xbgcolor="#FFFFFF">Project Name</td>
            <td width="36" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"  style="background-repeat:repeat-x">Status </td>
            <td width="36" align="left" valign="middle" background="<%=application.getContextPath()%>/images/table-box.jpg"  style="background-repeat:repeat-x">Due Date </td>
          </tr>
          <%
          List<Opportunity> liop=(List<Opportunity>)request.getAttribute("oppList");
          if(liop!=null){
          for(int i=0;i<liop.size();i++){
        	  java.sql.Date d=liop.get(i).getDuedate();
  			SimpleDateFormat sdf=new SimpleDateFormat("dd-MM-yyyy");
  			String dat=sdf.format(d);
           %>
          <tr>
            <td align="left" valign="top" bgcolor="#FFFFFF"><a href="#" > <span style="color: red;"><%=liop.get(i).getRefNum() %></span></a></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><%=liop.get(i).getEnqnum() %></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><%=liop.get(i).getEnquirytype() %></td>
            <td align="left" valign="top" bgcolor="#FFFFFF"><%=liop.get(i).getProjName() %></td>
            <td align="left" bgcolor="#FFFFFF" ><%=liop.get(i).getStatus() %></td>
            <td align="left" bgcolor="#FFFFFF" ><%=dat %></td>
          </tr>
          <%
          }
          }
           %>
        </table>
        
	 </div>
	 <table style="height:500px; width:910px;" ><tr><td>
	   <div class="boxtable" id="result">
	   <div id="partsDiv"></div>
	  </div>
	  </td>
	  </tr>
	  </table>
	 </div>
	 </div>
	 </div>
	  
    </div>
</body>
</html>
 